package com.tomcov.client.view;

import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.ListBox;

public class CreatUserViewImpl extends Composite implements CreatUserView{
	
	@SuppressWarnings("unused")
	private Presenter presenter;
	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);
	interface MyUiBinder extends UiBinder<AbsolutePanel, CreatUserViewImpl> {
	}
	
	@UiField Button NextButton;
	@UiField TextField<String> FirstName,LastName,userName,EmailAdress,Password;
	@UiField ListBox langageList;

	public CreatUserViewImpl(){
		initWidget(binder.createAndBindUi(this));
		
	}
	
	@Override
	public void setPresenter(Presenter presenter) {
		this.presenter=presenter;
	}

	@Override
	public Button getNextButton() {
		return NextButton;
	}

	@Override
	public TextField<String> getAdressEmail() {
		return EmailAdress;
	}

	@Override
	public TextField<String> getUserName() {
		return userName;
	}

	@Override
	public TextField<String> getPassword() {
		return Password;
	}

	@Override
	public TextField<String> getLastName() {
		return LastName;
	}

	@Override
	public TextField<String> getFirstName() {
		return FirstName;
	}

	@Override
	public String getLangage() {
		return langageList.getItemText(langageList.getSelectedIndex());
	}
	
	

}
